import  {debouce} from "components/common/utils/utils"

export const itemListenerMixin={
  data(){
    return {
      itemImgListener:null,
      newRefresh:null
    }
  },
  mounted(){
    let newRefresh=debouce(this.$refs.scroll.refresh,100)
    this.itemImgListener=()=>{
      this.newRefresh()
    }
    this.$bus.$on('itemImgLoad',this.itemImgListener)
  }
}
export const BackTop={
    data(){
      return {height:true};
    },
    methods:{
     backtop:function(){
       this.$refs.scroll.scrollTo(0,-10,1000)
     },
     listenHeight(postion){
       this.height=-postion.y>1000;
     }
   }
}
